<?php
/**
 * Created by PhpStorm.
 * User: 钊鑫
 * Date: 2019/1/26
 * Time: 15:12
 */
namespace app\api\service;

use app\api\model\Project as ProjectModel;
use think\facade\Cache;
use think\Db;

class Project
{
    static function handle($post,$uid){
        $count = ProjectModel::where(['id'=>$post['id']])->count();
        if($count > 0) {
            $result = ProjectModel::update($post);
            if($result) {
                $data = array('status' => 1, 'msg' => '更改项目成功！');
            }else {
                $data = array('status' => -1, 'msg' => '更改项目失败，请重新申请！');
            }
        }else {
            $data = array('status' => -1, 'msg' => '查询项目错误，请重新提交！');
        }
        return $data;
    }
}